package com.alex.space.commons.jdk.kit8;

import java.lang.annotation.Repeatable;

/**
 * @author Alex
 *         Created by Alex on 2017/12/21.
 *         <p>
 *         重复注解
 */
public class RepeatingAnnotations {

    @Repeatable(Authorities.class)
    public @interface Authority {
        String role();
    }

    public @interface Authorities {
        Authority[] value();
    }

    @Authority(role = "Admin")
    @Authority(role = "Manager")
    public void doSomeThing() {
        // TODO
    }
}
